<template>
	<view class="page">
		<top-detail></top-detail>
		<view class="check">
			<view class="check_title">
				<image src="/static/icon/icon1.png" alt="">
				<text>检查项</text>
			</view>
			<view class="check_type1">
				<view class="">
					外观/组件完好无损
				</view>
				<view class="">
					<image @tap="choiceAppearance(index)" :src="item" alt="" v-for="(item,index) in appearance"
						:key="index">
				</view>
			</view>
			<view class="check_type1">
				<view class="">
					工作状态/启闭灵活
				</view>
				<view class="">
					<image @tap="choiceWorkStatus(index)" :src="item" alt="" v-for="(item,index) in workStatus"
						:key="index">
				</view>
			</view>
		</view>
		<view class="ful">
			<view class="ful_left">
				描述
			</view>
			<view class="ful_right">
		
			</view>
		</view>
		<view class="ful">
			<view class="ful_left">
				图片
			</view>
			<view class="ful_right">
		
			</view>
		</view>
		<view class="btn btn_agree" @tap="agreeOrder">
			同意
		</view>
		<view class="btn btn_refuse" @tap="refuseOrder">
			拒绝
		</view>
	</view>
</template>

<script>
	import topDetail from '@/components/top_detail.vue'
	export default {
		components: {
			topDetail
		},
		data() {
			return {
				//检查项  外观
				appearance: [
					'/static/icon/ok.png',
					'/static/icon/err.png',
				],
				//检查项  外观 选择的项
				appearanceNum: null,
				//检查项  工作状态
				workStatus: [
					'/static/icon/ok.png',
					'/static/icon/err.png',
				],
				//检查项  工作状态 选择的项
				workStatusNum: null,
			}
		},
		methods: {
			//检查项  外观
			choiceAppearance(i) {
				this.appearanceNum = i
				if (i == 0) {
					this.appearance.splice(i, 1, '/static/icon/oked.png')
					this.appearance.splice(i + 1, 1, '/static/icon/err.png')
				} else {
					this.appearance.splice(i, 1, '/static/icon/erred.png')
					this.appearance.splice(i - 1, 1, '/static/icon/ok.png')
				}
			},
			//检查项  工作状态
			choiceWorkStatus(i) {
				this.workStatusNum = i
				if (i == 0) {
					this.workStatus.splice(i, 1, '/static/icon/oked.png')
					this.workStatus.splice(i + 1, 1, '/static/icon/err.png')
				} else {
					this.workStatus.splice(i, 1, '/static/icon/erred.png')
					this.workStatus.splice(i - 1, 1, '/static/icon/ok.png')
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.page {
		padding: 0 30rpx;
		box-sizing: border-box;
	}

	.check {
		padding: 30rpx 0;
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #7F8084;
		line-height: 40rpx;
		border-bottom: 2rpx solid #EFEFEF;

		.check_title {
			image {
				width: 20rpx;
				height: 28rpx;
				vertical-align: inherit;
				margin-right: 10rpx;
			}
		}

		.check_type1 {
			margin-left: 30rpx;
			margin-top: 20rpx;
			display: flex;
			justify-content: space-between;

			image {
				width: 32rpx;
				height: 32rpx;
				margin: 0 20rpx;
			}
		}
	}

	.ful {
		padding: 30rpx 0;
		box-sizing: border-box;
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		line-height: 40rpx;
		border-bottom: 2rpx solid #EFEFEF;

		.ful_left {
			color: #7F8084;
		}

		.ful_right {
			color: #474747;
		}
	}
</style>
